feat(imap): add folder listing and filtering for imap sync - #502
Conversation
roborev: Combined Review (
|
5673786 to
719d445
Compare
roborev: Combined Review (
|
20b05cc to
29d1801
Compare
|
please excuse the force-pushing. i messed up the history and decided to just squash everything. i'm not using gmail (or postgres, oops), so how would you like me to resolve the \All feedback? |
roborev: Combined Review (
|
roborev: Combined Review (
|
|
@mattf force pushing is very normal in this agent era. rebases are now basically free. huzzah! |
|
taking a look |
roborev: Combined Review (
|
roborev: Combined Review (
|
|
i went with the repeated arg approach after trying an escaping approach w/ granted, a |
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
|
I can take over from here |
821990a to
841e9d8
Compare
roborev: Combined Review (
|
841e9d8 to
7504da5
Compare
roborev: Combined Review (
|
👍 |
7504da5 to
cec0d51
Compare
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
8fa4402 to
8c60e35
Compare
roborev: Combined Review (
|
Add mailbox discovery and include/exclude filtering across the CLI, API, daemon client, documentation, and generated schemas. - distinguish authoritative membership snapshots from filtered and high-water scans - retain UIDVALIDITY evidence while forcing full enumeration - preserve canonical mailbox UIDs across moves, renames, overlaps, and page boundaries - compare raw MIME when Message-ID metadata cannot establish identity - avoid accessing excluded canonical mailboxes during filtered deduplication - leave inconclusive alternate IDs retryable for a later inclusive scan - track reconciliation mutations for cache rebuilding and stable sync statistics - cover complete, partial, filtered, UID-reuse, and cross-page rescan behavior Co-authored-by: Wes McKinney <wesmckinn+git@gmail.com> Generated with Codex Co-authored-by: Codex <noreply@openai.com>
8c60e35 to
5a955f2
Compare
roborev: Combined Review (
|
Deferred source identities must remain retryable until their exact mailbox can be validated, so folder high-water state cannot advance past them. Complete snapshots also need to converge older filtered-sync identities onto the mailbox advertised with \All, which keeps later rescans on the canonical fast path. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
roborev: Combined Review (
|
|
Will merge pending CI. If I broke something in all my grinding please open another PR! |
The IMAP regression coverage introduced by this branch crossed the repository's local testify-helper threshold and exposed additional static-analysis findings once that prerequisite passed. Keep the tests aligned with the enforced helper, resource-cleanup, and modern Go conventions so the CI lint gate can exercise the implementation. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
|
@wesm that was a pretty epic back and forth |
roborev: Combined Review (
|
What changed
msgvault list-folders [account]to show selectable IMAP folders and approximate message counts. Without an account name, it lists folders for every configured IMAP account.--foldersand--skip-foldersoptions to bothsync-fullandsync. Each flag takes one complete folder name, so names containing commas work correctly.Why
A first sync can take a long time on a large IMAP account. Folder filtering lets someone start with a useful subset, confirm that msgvault fits their needs, and expand the archive later. It also lets ongoing syncs ignore folders that are not useful to the local archive.
How to use it
First, find the folder names reported by the server:
Sync only selected folders by repeating
--folders:Or scan everything except selected folders by repeating
--skip-folders:Folder names use exact, case-insensitive matching. When include and exclude flags are combined, msgvault applies the include list first and then removes excluded folders. The flags affect IMAP accounts only and apply to the current command. With no folder flags, msgvault scans every selectable folder.
Filtering changes which remote folders are scanned; it does not delete messages from the provider or remove messages already stored in the local archive.
Closes #196.